A revised algorithm covering an expanded range of altitudes is described for computing altitude dependent corrected geomagnetic (CGM) coordinates from geocentric coordinates (and, where it exists, the inverse) using spherical harmonics. The original version was based upon the IGRF 90 magnetic field model, and was recently upgraded using the IGRF 95 model. In common with the two previous versions, the revised algorithm uses a tenth order spherical harmonic fit to the direction cosines (a unit vector) in a suitably chosen intermediate, altitude adjusted coordinate system. The additional coordinate system is needed to avoid convergence problems associated with the discontinuity in the CGM latitude at the magnetic equator at non-zero altitude. In previous versions the altitude dependence was obtained by computing the spherical harmonic fits to the Geographic -> CGM computation (and inverse) at 0, 300 and 1200 km altitude. They used a quadratic fit to interpolate each coefficient, and were limited to computing CGM coordinates and their inverse for an altitude range of 0 - 2000 km. In the revised algorithm the altitude dependence is based upon a fourth order polynomial fit of the spherical harmonic coefficients for 24 altitudes in the range of 0 - 7200 km. This provides an improved representation of the CGM compression around the South Atlantic Anomaly in addition to improved modeling of the increasing discontinuity with altitude at the magnetic equator.